<template>
  <div id="bottom">
    <p id="top"> <span @click="prev()">&lt;</span> <span id="top-center">账号管理</span></p>
    <hr>
    <ul>
      <li>
        管家id
       <span>{{this.user}}</span>
      </li>
      <li>
        手机号码
        <span></span>
      </li>
      <li>
        邮箱地址
        <span> {{this.b}}</span>
      </li>
      <li id="special">
        设置密码
        <span>></span>
      </li>
      <li>
        隐私协议
      </li>
      <li>
        用户协议
      </li>
    </ul>
    <button @click="fun()">退出登录</button>
     <span id="yz">{{this.yz}}</span>
  </div>
 
</template>

<script>
import  {DELETE}from 'a/DELETE.js'
// import  from ''
export default {
  data(){
    return{
      user:"",
      yz:"",
      arr:[],
      b:""
    }
  },
  methods:{
    prev(){
       this.$router.go(-1)
    },
    aol(){
                 this.user=localStorage.getItem("userid")
                   this.b=localStorage.getItem("email")
    },
// 删除token
    fun(){

      console.log(window.localStorage.getItem("token"))
             DELETE('http://180.76.121.47:8008/logout?token='+window.localStorage.getItem("token")).then((ok)=>{
            console.log(ok)
            console.log(2)
                //  this.user=localStorage.getItem("token")

    })
         localStorage.setItem("token","")
        this.yz="您已退出您的账号"
      },
    
    },

    created(){
    this.aol()
  },
  
};
</script>
















<style scoped>
#bottom{
  font-size: 0.17rem;
  width: 100%;
  height: 6rem;
  /* background-color: pink; */
}
#bottom ul{
  margin-top: 1rem;
  height: 4rem;
}
#bottom #top{
  height: 0.5rem;
  line-height: 0.5rem;
  color: orange;
  font-size: 0.17rem;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
 /* padding: 0rem 0.5rem 0rem 0.5rem; */
}
#bottom #top #top-center{
  text-align: center;
  line-height: 0.5rem;
  display: block;
  margin: auto;
  color: black;
  font-size: 0.25rem;
}
#bottom ul li{
  height: 0.5rem;
  /* background-color: pink; */
  line-height: 0.5rem;
  box-sizing: border-box;
  /* padding: 0rem 0.5rem 0rem 0.5rem; */
  /* border-top: 0.01rem solid gray; */
  border-bottom: 0.01rem solid gray;
  font-size: 0.17rem;
}
#bottom ul li span{
  float: right;
}
button{
  width: 80%;
  height: 0.5rem;
  background-color: red;
  color: white;
  border-radius: 0.2rem;  
  display: block;
  margin: auto;
}
#yz{
  margin: auto;
  width: 90%;
  margin-top: 0.2rem;
  display:block;
  text-align:center;
  font-size: 0.1rem;
  color: red;
}


</style>
